package com.example.designmodel.singleinstance

/**
 * Created by  you
 * Date: 2022/3/14
 * Time: 18:43
 * 懒汉式+锁
 */
class SingleInstance03 {
    companion object{
        @get:Synchronized
        private var singleInstance03:SingleInstance03?=null
         get() {
             if (field==null){
                 field = SingleInstance03()
             }
             return field
         }

    }
}